#include "Vehicle.h"
#include <iostream>
#include <iomanip>

Vehicle::Vehicle() {}

Vehicle::Vehicle(const std::string& id) : id(id) {}

// Getters
std::string Vehicle::getId() const { return id; }
Chassis Vehicle::getChassis() const { return chassis; }
AGXKit Vehicle::getAgxKit() const { return agxKit; }
StereoCamera Vehicle::getStereoCamera() const { return stereoCamera; }
Lidar Vehicle::getLidar() const { return lidar; }
Gyroscope Vehicle::getGyroscope() const { return gyroscope; }
Display Vehicle::getDisplay() const { return displayScreen; }
Battery Vehicle::getBattery() const { return battery; }
Student Vehicle::getStudent() const { return student; }

// Setters
void Vehicle::setId(const std::string& id) { this->id = id; }
void Vehicle::setChassis(const Chassis& chassis) { this->chassis = chassis; }
void Vehicle::setAgxKit(const AGXKit& agxKit) { this->agxKit = agxKit; }
void Vehicle::setStereoCamera(const StereoCamera& stereoCamera) { this->stereoCamera = stereoCamera; }
void Vehicle::setLidar(const Lidar& lidar) { this->lidar = lidar; }
void Vehicle::setGyroscope(const Gyroscope& gyroscope) { this->gyroscope = gyroscope; }
void Vehicle::setDisplay(const Display& display) { this->displayScreen = display; }
void Vehicle::setBattery(const Battery& battery) { this->battery = battery; }
void Vehicle::setStudent(const Student& student) { this->student = student; }

void Vehicle::show() const {
    std::cout << "========================================" << std::endl;
    std::cout << "智能小车信息" << std::endl;
    std::cout << "编号: " << id << std::endl;
    std::cout << "========================================" << std::endl;
    
    chassis.display();
    std::cout << std::endl;
    
    agxKit.display();
    std::cout << std::endl;
    
    stereoCamera.display();
    std::cout << std::endl;
    
    lidar.display();
    std::cout << std::endl;
    
    gyroscope.display();
    std::cout << std::endl;
    
    displayScreen.display();
    std::cout << std::endl;
    
    battery.display();
    std::cout << std::endl;
    
    student.display();
    std::cout << "========================================" << std::endl;
}